package com.shigu.account.enums;

/*
 * create by  过儿  2019-06-03
 *
 */
public enum VipLevel {
    ADMIN(99, "后台管理"),
    COMMON(1, "普通"),
    STAFF(2, "店员"),
    OWNER(3, "店长"),
    BOSS(4, "BOSS");

    public static VipLevel selByValue(int value) {
        for (VipLevel level : VipLevel.values()) {
            if (level.getValue() == value) {
                return level;
            }
        }
        return COMMON;
    }

    VipLevel(int value, String title) {
        this.value = value;
        this.title = title;
    }

    private int value;
    private String title;

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
